/** ****************************************************************************
 * Copyright (c) 2015 ~ 2018 EasyLinkIn\n
 * All rights reserved.
 *
 * @file    rfTransfer.h
 * @brief   rf transfer
 * @version 1.0
 * @author  
 * @date    
 * @warning No Warnings
 * @note <b>history:</b>
 * 1. first version
 *
 */

#ifndef __RFTRANSFER_H__
#define __RFTRANSFER_H__

/*******************************************************************************
 * INCLUDES
 */

#include "stdint.h"
#include "stdbool.h"

#ifdef __cplusplus
extern "C"{
#endif

/*******************************************************************************
 * DEBUG SWITCH MACROS
 */

#if 0
/*******************************************************************************
 * MACROS
 */
#define RF_MODE_NORMAL          (0)
#define RF_MODE_WAKE            (1)
#define RF_MODE_CAD             (2)
#define RF_MODE_SLEEP           (3)


/*******************************************************************************
 * CONSTANTS
 */

/*******************************************************************************
 * TYPEDEF
 */
typedef struct tagRfPara{
    uint32_t ulFreq;
    uint32_t ulFdev;
    uint32_t bandwidthAfc;
    int8_t cPwr;
    uint8_t ucBw;
    uint8_t ucSf;
    uint8_t ucCodingRate;
    uint16_t usPreamble;
    uint16_t usWakeTime;
    uint8_t iqInverted;
    uint8_t ucCrc;
    uint8_t ucFhss;
    uint8_t ucModem;
}rfPara_t;

typedef struct tagUartPara{
    uint32_t usBaud;
    uint8_t ucParity;
    uint8_t ucStopBits;
    uint8_t ucCtrlFlow;
    uint8_t ucReserve;
}uartPara_t;

typedef struct tagRfTranPara{
    rfPara_t tRf;
    uartPara_t tUart;
    uint32_t ulCrc;
}RfTranPara_t;

/*******************************************************************************
 * GLOBAL VARIABLES DECLEAR
 */

#endif 


/*******************************************************************************
 * GLOBAL FUNCTIONS DECLEAR
 */
//extern void rf_initPara( uint8_t a_ucMode, rfPara_t *a_tPara );
//extern void rf_setMode( uint8_t ucMode );
//extern void rf_send( uint8_t *a_pucData, uint16_t a_usLen );
//extern void rf_sleep( void );

#ifdef __cplusplus
}
#endif


#endif
